import Mock from 'mockjs'
import { CONSTANT_OBJ } from '@/utils/constant'
let baseURL
let locationHref = `http://${window.location.hostname}`
console.log(1111, CONSTANT_OBJ.ENV, CONSTANT_OBJ.ENV !== 'prodMaster')
if (CONSTANT_OBJ.ENV !== 'prodMaster') {
  baseURL = CONSTANT_OBJ.URL + CONSTANT_OBJ.PREFIX + '/user'
} else {
  baseURL = locationHref + CONSTANT_OBJ.PREFIX + '/user'
}
console.log(222, baseURL)
// 客户申请信息
Mock.mock(`${baseURL}/v1/api/user/user/login`, function () {
  return {
    ...CONSTANT_OBJ.MOCK_RESPONSE,
    data: {
      userName: 'admin',
      token: '342323dfdfdsffdkhfdfdfdfhdfhdsfjdfd',
      showResetTips: true,
      passwordExireTime: '2022-08-23'
    }
  }
})
